package com.amkai.mobile.client.color;

import java.util.StringTokenizer;

import android.graphics.Color;

public class ColorUtilities {
    
    

    /**
     * 
     * Method: AdjustBrightness 
     * @param originColor Color - The interested color
     * @param index double - Index value
     * @param darkest boolean - True if deepest false if brightest
     * @return Color - Darkest from originColow with ix
     */
    public static Color AdjustBrightness(Color originColor, double index, boolean darkest) {
//        float[] hsvModel = null;
        Color darkestColor = null;
//        float hue, saturation, brightness = 0;
//        try {
//            hsvModel = new float[3];
//            Color.colorToHSV(originColor, hsvModel);
//            int oColor = originColor.;
//            int red = Color.red(oColor);
//            int green = Color.green(oColor);
//            int blue = Color.blue(oColor);
//            Color.RGBToHSV(red, green, blue, hsvModel);
//            hue = hsvModel[0];
//            saturation = hsvModel[1];
//            brightness = hsvModel[2];
//            if (darkest) 
//                brightness -= index;
//            else
//                brightness += index;
//            String colorString = "#" + Integer.toHexString(Color.HSVToColor(hsvModel));
//            darkestColor = Color.parseColor(colorString);
//        }
//        finally {
//            // 2005.08.27.
//            hsvModel = null;
//        }
        return darkestColor;
    }
    

}
